<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
		<title>我的证书列表页</title>
		<link rel="stylesheet" type="text/css" href="../../css/api.css" />
		<link rel="stylesheet" href="../../css/mui.min.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/weui.min.css" />
		<link rel="stylesheet" href="../../css/base.css"/>
		<link rel="stylesheet" href="../../css/personal.css">
		<link rel="stylesheet" href="../../css/CFNetPP_Base.css">
		<style>
			.attestation  .mui-table-view-cell:active {
				background: #fff;
			}
			.body {
				background-color: #f3f5f7;
			}
			.mui-table-view:after {
				position: inherit;
			}
			.course-image {
				background-image: url(../../image/course_placehoder.png);
				background-size: 100% 180px;
			}
			.footer-view {
				position: fixed;
				left: 0;
				bottom: 0;
				margin: 0;
				width: 100%;
				height: 50px;
				padding: 0;
			}
			.footer-view .mui-btn-block {
				width: 100%;
				height: 100%;
				margin: 0;
				padding: 0;
				background-color: #18b4ed;
				border-color: #18b4ed;
				color: white;
				font-size: 16px;
			}
			.footer-view .mui-btn-block:active {
				background-color: #1094ba;
			}
			.mui-btn, button {
				border-radius: 0px;
				border-top-left-radius: 0px;
				border-top-right-radius: 0px;
				border-bottom-right-radius: 0px;
				border-bottom-left-radius: 0px;
			}
			.blank-div {
				height: 50px;
			}
			.titleDiv {
				color: #333333;
				font-size: 16px
			}
			.bodyDiv {
				font-size: 14px;
				padding: 10px;
				color: #7f7d7d;
			}
			.footer-view .mui-btn-nomal {
				width: 100%;
				height: 100%;
				margin: 0;
				padding: 0;
				background-color: #e5e7e7;
				border-color: #e5e7e7;
				color: #7f7d7d;
				font-size: 16px;
			}
			.footer-view .mui-btn-nomal:active {
				color: #7f7d7d;
				background-color: #e5e7e7;
			}
		</style>
	</head>
	<body>
		<div class="base_style_color " id='BarAppearance' style="height: 22px;width: 100%"></div>
		<div class="base_navigation_bar base_style_color base_navigation_item_bar">
			<a class="base_left_item" href="#" onclick="backClick()"> <img class="base_back_icon" src="../../image/icon_jiantou.png" alt=""> </a>
			<span id="title">运输操作员</span>
		</div>
		<div id="main" style="margin-top: 66px" class="attestation">
			<ul class="mui-table-view" id="list_id">
				<li class="mui-table-view-cell mui-media list_item">
					<a href="javascript:;"> <img class="listImg " src="../../image/list-default.png" onclick="ShowImage(this.src)" id="Attestation_Img"> </a>
				</li>
				<div class="interval"></div>
				<li    class="mui-table-view-cell mui-media list_item" id="analyze" style='display: none'>
					<span class="font_balck titleDiv">测评分析</span>
					<div class="mui-media-body bodyDiv" id='analyzeDiv'></div>
				</li>
				<div class="footer-view" >
					<button id="study_btn" type="button"  class="mui-btn mui-btn-block" onclick="openApply()" style="display: none">
						申请纸质证书
					</button>
					<button id="study_btn2" type="button"  class="mui-btn  mui-btn-nomal" onclick="openApplyScore()" style="display: none">
						已申请纸质证书
					</button>
				</div>
			</ul>
		</div>
		</div>
	</body>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/MD5.js"></script>
	<script src="../../script/jquery.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="../../script/requestTool.js"></script>
	<script src="../../script/common.js"></script>
	<script type="text/javascript">
		apiready = function() {
			showProgress();
			loadData();
			analyzeIsNull();
		}
		function loadData() {
			var data = api.pageParam.data;
			var iscertificate = api.pageParam.data[0].iscertificate;
			if (iscertificate == '2') {
				$('#study_btn').show();
			} else {
				$('#study_btn2').show();
			}
			//			$('#analyzeDiv').html(analyzeIsNull(data[0].analyze));
			$('#title').html(data[0].qname);
			document.getElementById('Attestation_Img').src = PicDomainName(getpicurl(data[0].img),320);
			hideProgress();
		}

		function analyzeIsNull(str) {
			if (str == null || str == 'null' || str == '') {
				$('#analyze').hide();
			} else {
				$('#analyzeDiv').html(data[0].analyze);
				$('#analyze').show();
			}
		}

		function ShowImage(src) {
			var imgArr = new Array();
			var files = getpicurl(src);
			imgArr.push(files);
			showimg(imgArr, 0);
		}

		function openApply() {
			api.openWin({useWKWebView:true,
				name : 'ApplyCertificateFrame',
				url : 'ApplyCertificateFrame.html',
				pageParam : {
					id : api.pageParam.id //企业id
				}
			});
		}

		function openApplyScore() {
			ShowToast('已经申请成功纸质证书');
		}
	</script>
</html>